﻿#ifndef ORDER_HANDLE_H
#define ORDER_HANDLE_H

#include <QObject>
#include "global_define.h"

enum FUNCODE{
    FILENAME,
    FILEDATA,
    SENDOVER,
    RUNONLINE,
    STOPRUN,
    PAUSERUN,
    EMPTY
};

class order_handle : public QObject
{
    Q_OBJECT
public:
    explicit order_handle(QObject *parent = 0);
    QByteArray make_codeDownload_order(char addr = 0, FUNCODE func = EMPTY, QString data = 0);
    QByteArray make_codeDownload_order(char addr = 0, FUNCODE func = EMPTY, QByteArray data = 0);
    QList<QByteArray> data_subpackage(QString data, int pakLen);
    QByteArray make_endpackage(char addr);
    int check_returnOrder(QByteArray data);

private:
    char checkdata(char func, QByteArray data);

signals:

public slots:

};

#endif // ORDER_HANDLE_H
